# src库 - 按照Clean Architecture层级构建
cmake_minimum_required(VERSION 3.16)

# 子目录 - 按照依赖层级顺序
add_subdirectory(kernel)          # 核心层，无依赖
add_subdirectory(application)     # 应用层，依赖kernel
add_subdirectory(infrastructure)  # 基础设施层，依赖kernel
add_subdirectory(presentation)    # 表示层，依赖application

# 创建系统库（聚合所有层的库）
add_library(agv_system_lib STATIC)

# 链接子库依赖
target_link_libraries(agv_system_lib PUBLIC
    kernel
    application
    infrastructure
    presentation
    $<$<TARGET_EXISTS:Boost::headers>:Boost::headers>
    $<$<TARGET_EXISTS:libmrlp>:libmrlp>
)


# 包含目录
target_include_directories(agv_system_lib PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}
) 
